<?php /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id'=>'create-resource-physical',
    'type'=>'horizontal',
    'enableClientValidation'=>true,
    'clientOptions'=>array(
        'validateOnSubmit'=>true,
    ),
)); ?>
 
<fieldset>
 
    <legend><?php echo $model->isNewRecord ? '新增物理资源' : '修改物理资源'?></legend>
    <?php echo $form->errorSummary($model); ?>
    <?php echo $form->textFieldRow($model, 'physical_name'); ?>
    <?php echo $form->dropDownListRow($model, 'res_id', Resource::listItems()); ?>
    <?php echo $form->dropDownListRow($model, 'physical_type', PhysicalType::$names); ?>
    <?php echo $form->textFieldRow($model, 'storage'); ?>
    <?php echo $form->textFieldRow($model, 'partition_format'); ?>
    <?php echo $form->dropDownListRow($model, 'system_id', StorageSystem::listItems(),  array('hint'=>'如果列表中不存在，点击<a href="?r=storage/create">添加存储系统</a>。')); ?>
    <?php echo $form->textFieldRow($model, 'keep_days'); ?>
</fieldset>
<div class="form-actions">
    <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'type'=>'primary', 'icon'=>'ok white', 'label'=>$model->isNewRecord ? '创 建' : '保 存')); ?>
    <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'reset', 'icon'=>'remove', 'label'=>'取 消')); ?>
</div>
<?php $this->endWidget(); ?>
